<?php
$this->breadcrumbs = array(
	'All Users' => array('users/index'),
	$user->name => array('users/view', 'id' => $user->id),
	'Edit User'
);
?>
<script type="text/javascript">
	var userId = <?php echo $user->id; ?>;
	var selectedOverride;
</script>
<?php $this->renderPartial('_tabs', array('user' => $user)); ?>
<div class="grid_16">
	<div id="edit-profile" class="section">
		<div class="block">
			<h2>
				<img src="/images/icons/farmfresh/32x32/bank.png" />
				Bank Information
			</h2>
			<?php
			$form = $this->beginWidget('CActiveForm', array(
				'id' => 'user-form',
				'enableAjaxValidation' => FALSE,
			));
			?>
			<table class="form-table">
				<tr>
					<th scope="row" width="150" class="align-right">
						<?php echo $form->labelEx($user, 'bank_name', array('label' => 'Bank')); ?>
					</th>
					<td>
						<div class="form-table-block">
							<?php echo $form->labelEx($user, 'bank_name'); ?>
							<?php echo $form->textField($user, 'bank_name', array('size' => 45, 'maxlength' => 255)); ?>
							<?php echo $form->error($user, 'bank_name'); ?>
							<p class="hint no-margin">E.g. DBS</p>
						</div>

						<div class="form-table-block">
							<?php echo $form->labelEx($user, 'bank_code'); ?>
							<?php echo $form->textField($user, 'bank_code', array('size' => 10, 'maxlength' => 20)); ?>
							<?php echo $form->error($user, 'bank_code'); ?>
							<p class="hint no-margin">E.g. 7171</p>
						</div>
					</td>
				</tr>
				<tr>
					<th scope="row" width="150" class="align-right">
						<?php echo $form->labelEx($user, 'bank_branch'); ?>
					</th>
					<td>
						<div class="form-table-block">
							<?php echo $form->labelEx($user, 'bank_branch', array('label' => 'Branch Name')); ?>
							<?php echo $form->textField($user, 'bank_branch', array('size' => 45, 'maxlength' => 255)); ?>
							<?php echo $form->error($user, 'bank_branch'); ?>
							<p class="hint no-margin">E.g. Ang Mo Kio Branch</p>
						</div>

						<div class="form-table-block">
							<?php echo $form->labelEx($user, 'bank_branch_code', array('label' => 'Branch Number')); ?>
							<?php echo $form->textField($user, 'bank_branch_code', array('size' => 10, 'maxlength' => 20)); ?>
							<?php echo $form->error($user, 'bank_branch_code'); ?>
							<p class="hint no-margin">E.g. 081</p>
						</div>
					</td>
				</tr>
				<tr>
					<th scope="row" class="align-right">
						<?php echo $form->labelEx($user, 'bank_account_name'); ?>
					</th>
					<td>
						<?php echo $form->textField($user, 'bank_account_name', array('size' => 45, 'maxlength' => 30)); ?>
						<?php echo $form->error($user, 'bank_account_name'); ?>
						<p class="hint no-margin">E.g. <?php echo $user->name; ?></p>
					</td>
				</tr>
				<tr>
					<th scope="row" class="align-right">
						<?php echo $form->labelEx($user, 'bank_account_no'); ?>
					</th>
					<td>
						<?php echo $form->textField($user, 'bank_account_no', array('size' => 16, 'maxlength' => 30)); ?>
						<?php echo $form->error($user, 'bank_account_no'); ?>
						<p class="hint no-margin">E.g. 123-456-789-0</p>
					</td>
				</tr>
				<tr>
					<th scope="row" class="align-right">
						<?php echo $form->labelEx($user, 'bank_owner_contact'); ?>
					</th>
					<td>
						<?php echo $form->textField($user, 'bank_owner_contact', array('size' => 16, 'maxlength' => 30)); ?>
						<?php echo $form->error($user, 'bank_owner_contact'); ?>
					</td>
				</tr>
				<tr>
					<th scope="row" class="align-right">
						<?php echo $form->labelEx($user, 'bank_owner_address'); ?>
					</th>
					<td>
						<?php echo $form->textArea($user, 'bank_owner_address', array('cols' => '45', 'rows' => 4)); ?>
						<?php echo $form->error($user, 'bank_owner_address'); ?>
					</td>
				</tr>
			</table>
			<div class="row buttons">
				<div class="cell">
					<?php echo CHtml::submitButton('Save Changes', array('class' => 'no-margin green')); ?>
				</div>
			</div>
		</div>
		<?php $this->endWidget(); ?>
	</div>
</div>